package com.buobao.springmvc.controller;

import com.buobao.springmvc.entity.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/fm")
public class FreeMarkerController {

    @GetMapping("/tt")
    public ModelAndView showTest(){
        ModelAndView modelAndView = new ModelAndView("/test");
        User user = new User();
        user.setUsername("buobao");
        user.setPassword("123321");
        modelAndView.addObject("u",user);
        return modelAndView;
    }
}
